import './app.less'
import './common.css'
import Taro from "@tarojs/taro";
import globalStore from './state/globalData';
import 'taro-ui/dist/style/index.scss'

function App (props) {
  //自定义导航栏获取系统参数
    const {height,width,top,right} = Taro.getMenuButtonBoundingClientRect();
    const {statusBarHeight,windowWidth} = Taro.getSystemInfoSync();
    globalStore.upStatusBarHeight(statusBarHeight);
    globalStore.upNavigationBarHeight(height+(top-statusBarHeight)*2);
    globalStore.upNavigationLRPadding(windowWidth-right);
    globalStore.upMenuButtonHeight(height);
    globalStore.upMenuButtonWidth(width);
    globalStore.upWindoWidth(windowWidth)

  // props.children 是将要会渲染的页面
    return props.children
}

export default App
